-
Notifications
You must be signed in to change notification settings - Fork 5.4k
fix: Vault Corruption flaky test no such window: target window already closed and NoSuchAlertError: no such alert
#37379
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Results generated automatically by MetaMask CI |
Builds ready [c39599c]
UI Startup Metrics (1276 ± 82 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Results generated automatically by MetaMask CI |
Builds ready [28a2036]
UI Startup Metrics (1264 ± 80 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Results generated automatically by MetaMask CI |
Builds ready [e54c0bc]
UI Startup Metrics (1265 ± 76 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
no such window: target window already closed
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Results generated automatically by MetaMask CI |
Builds ready [d6f2069]
UI Startup Metrics (1243 ± 79 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Results generated automatically by MetaMask CI |
Builds ready [9afd08f]
UI Startup Metrics (1315 ± 93 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Results generated automatically by MetaMask CI |
Builds ready [f6dfa7a]
UI Startup Metrics (1250 ± 78 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
no such window: target window already closedno such window: target window already closed and NoSuchAlertError: no such alert
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Results generated automatically by MetaMask CI |
Builds ready [ef934d2]
UI Startup Metrics (1267 ± 77 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Description
Vault Corruption is very flaky. The test fails after we have corrupted the vault and we click on the Critical Button error, as this causes to sometimes close the MM window completely, and then leading then to this error:
Or this one:
NoSuchAlertError: no such alertIt seems the issue might be in the button handler, so here I'm adding a flag to ensure the button handler cannot be overwritten: once #errorDisplayed is true, no subsequent calls to displayCriticalError or displayStateCorruptionError will execute.
I suspect this can happen because we are trying to open MM multiple times (with the waitUntil) and some previous call can overwrite that? ---to verify with @davidmurdoch @Gudahtt
It might be better to fully understand what's hanging (if that's the case) that then overrides the handler, though I think the change is safe/won't have unintended consequences
Changelog
CHANGELOG entry:
Related issues
Fixes: #36916
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Replace polling-based wait with a fixed delay and loading check in the vault-corruption E2E test.
test/e2e/tests/vault-corruption/vault-corruption.spec.tswaitForVaultRestorePage:waitUntilloop that repeatedly navigated and checked window title.PAGES.HOMEwithwaitForControllers: false, then assert.loading-logois not present.Written by Cursor Bugbot for commit ef934d2. This will update automatically on new commits. Configure here.